package com.sgcc.epri.dcloud.run;

import com.sgcc.epri.dcloud.mapper.dm.TaskMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class StartUpFunction implements CommandLineRunner {

    private final Logger log =  LoggerFactory.getLogger(this.getClass());

    @Autowired
    private TaskMapper taskMapper;

    @Override
    public void run(String... args) throws Exception {
        taskMapper.deleteRecord();
        log.info("任务状态表记录已清空！");
    }
}
